1. Technical Field
The present invention relates generally to data display terminals for data processing systems, and more particularly to software utilities for interfacing an application program to a data display terminal. Specifically, the present invention concerns a method and system for building display screens and receiving user data entered into the display screens in such a way that the content and format of the display screens is readily adapted to a specific application or modified during the design, development and maintenance of the application program.
2. Background Art
Data display terminals are well known in the data processing field. In general, a data display terminal includes a keyboard for receiving alphanumeric data from a user, a display device such as a cathode ray tube or matrix of display elements such as electroluminescent or liquid crystal junctions, and an image buffer for storing a page of data to be displaced on the display device.
Typically, the image buffer is an addressable memory having respective storage locations corresponding to predefined pixel or character positions on the screen of the display device. Each storage location, for example, holds a binary code for the alphanumeric or graphic character to be displayed at the respective position, and display attributes defining the manner in which the character is to be displayed. The display attributes typically control the intensity or color of the character and permit the character to be selectively underlined, blinked, or displayed in a "reversed field" fashion in which the intensity or color of the background of the screen is interchanged with the intensity or specified for the character in the image buffer.
In some cases the image buffer is a contiguous set of storage locations allocated as a portion of the main random access memory for a central processor in a data processing system. In this case the programmer can write machine language instructions which directly specify the characters to be displayed and their respective positions on the display screen by writing character and attribute codes directly to the respective addresses of the image buffer. Alternatively, the image buffer is connected to the central processor via an input-output port, and the character and attribute codes along with specified respective image buffer addresses are transmitted through the input-output port.
A number of software utilities are commercially available for assisting the programmer in addressing the image buffer and specifying the desired character and attribute codes. To display a character string in a "field" beginning at a selected position on the display screen, for example, a subroutine in the utility is called. The character string and the selected position on the display screen are passed as parameters to the subroutine. The parameters include, for example, a literal or string variable representing the character string, and a pair of constants or numeric variables specifying the row and column coordinates of the selected position. When a variable is to be used as a parameter, the datatype or length of the variable is also specified.
When the data terminal is used for input of data, a character being entered on the keyboard is typically displayed at an indicated position on the display screen. That position is indicated by a special symbol or change in the display attributes, known as a "cursor". The software utility for the display terminal has a data input function which activates the cursor at the current cursor position. When an alphanumeric character is entered at the keyboard, the character is written to the current cursor position of the image buffer, causing the character to be displayed in lieu of the cursor. The character may then be used as input data. Additional characters are entered by advancing the cursor position and repeating the process.
For many applications, it is desirable to display an entire screen of data, and then have the user enter data in selected fields on the display. The fields are assigned different access types such as "output only" or "input-output". The fields are defined, for example, by a different subroutine call for each of the access types. When an "input-output" field is defined, the boundaries of the field are stored in memory. The data input function initially places the cursor at the first character position in the first "input-output" field. As characters are entered from the keyboard, the cursor is advanced to a position that falls within an "input-output" field on the display screen. Therefore, the "output only" fields and unassigned locations of the display screen are "protected" from being changed by the user.
The data entry process typically continues until the user enters a control character, for example, by activating an "enter" key on the keyboard. At this time the data input function scans the buffer image of each of the "input-output" fields in an attempt to convert the character codes in the images of the fields to data values consistent with the data types of the variables associated with the fields. If the conversion is unsuccessful, an error message is displayed to the user, the cursor is placed in the field containing the error and the data entry process is repeated.
Data-base applications have used the above-described data display and entry process. In this case a set of screens are programmed for each of the record formats of the files in the data base. As noted above, this has required a subroutine call including the screen coordinates of each field in each screen. In many cases, the programming has been rather laborious. When a record format of the data base is changed, subroutine calls for certain fields must be added or deleted, and in many cases the screen coordinates of other fields must be changed to accommodate fields that have been added or deleted.